package net.zoneland.data.dataprofiling.common.config;

//@Component
//class WebConfigurer extends WebMvcConfigurerAdapter {
//	@Autowired
//	DataprofilingConfig dataprofilingConfig;
//	@Override
//	public void addResourceHandlers(ResourceHandlerRegistry registry) {
//		registry.addResourceHandler("/files/**").addResourceLocations("file:///"+dataprofilingConfig.getUploadPath());
//	}
//
//}

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

class WebConfigurer implements WebMvcConfigurer {

	@Value("${dataprofiling.uploadPath}")
	private String uploadPath;

	@Override
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		registry.addResourceHandler("/files/**").addResourceLocations("file:///"+uploadPath);
	}
}